From 7f18fb47e5a86772b274fe4811b99f7cf600371b Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 25 Oct 2010 18:15:28 +0100 Subject: [PATCH] libxc: correct handling of switch_qemu_logdirty callback return value The callback return convention follows xc_domain_save and therefore returns 0 on success and >0 on error, correct the check accordingly. Signed-off-by: Ian Campbell Signed-off-by: Ian Jackson --- tools/libxc/xc_domain_save.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c index 47f8a79c9d..eee8fb47d2 100644 --- a/tools/libxc/xc_domain_save.c +++ b/tools/libxc/xc_domain_save.c @@ -1015,7 +1015,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter } /* Enable qemu-dm logging dirty pages to xen */ - if ( hvm && !callbacks->switch_qemu_logdirty(dom, 1, callbacks->data) ) + if ( hvm && callbacks->switch_qemu_logdirty(dom, 1, callbacks->data) ) { PERROR("Couldn't enable qemu log-dirty mode (errno %d)", errno); goto out; @@ -1879,7 +1879,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter XEN_DOMCTL_SHADOW_OP_OFF, NULL, 0, NULL, 0, NULL) < 0 ) DPRINTF("Warning - couldn't disable shadow mode"); - if ( hvm && !callbacks->switch_qemu_logdirty(dom, 0, callbacks->data) ) + if ( hvm && callbacks->switch_qemu_logdirty(dom, 0, callbacks->data) ) DPRINTF("Warning - couldn't disable qemu log-dirty mode"); } -- 2.30.2